package cn.tedu.batch.transformation

import org.apache.flink.api.scala.ExecutionEnvironment

/**
 * @author Amos
 * @date 2022/5/19
 */

//filter算子
object BatchFilterDemo {
  def main(args: Array[String]): Unit = {
    val env = ExecutionEnvironment.getExecutionEnvironment
    import org.apache.flink.api.scala._
    val source: DataSet[String] = env.fromCollection(List("hadoop", "hive", "spark", "flink"))

    // 数据过滤，保留h开头的单词
    source.filter(_.startsWith("h")).print()


  }

}
